package com.nai365.nart.member.feign;

import com.nai365.nart.common.core.constant.SecurityConstants;
import com.nai365.nart.common.core.constant.ServiceNameConstants;
import com.nai365.nart.common.core.util.R;
import com.nai365.nart.member.entity.RealName;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteUmsRealNameService", value = ServiceNameConstants.MEMBER_SERVICE)
public interface RemoteUmsRealNameService {
	/**
	 * 新增实名
	 * @param realName 实名
	 * @return R
	 */
	@PostMapping("/realname")
	public R save(@RequestBody RealName realName,@RequestHeader(SecurityConstants.FROM) String from);


	/**
	 * 根据手机号查询RealName对象
	 * @param phone
	 * @return
	 */
	@GetMapping("/realname/find/{phone}" )
	public RealName findRealNameByPhone(@PathVariable("phone" ) String phone,@RequestHeader(SecurityConstants.FROM) String from);

}
